<?php

namespace catchAdmin\permissions\request;

use catchAdmin\permissions\model\Users;
use catcher\base\CatchRequest;

class CreateRequest extends CatchRequest
{

    protected function rules(): array
    {
        // TODO: Implement rules() method.
        return [
            'username|用户名' => 'require|max:20',
            'password|密码' => 'require|regex:/^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[\W_]).{7,}$/',
            'email|邮箱' => 'email',
            'doctor_code|医生编码' => 'require'
        ];
    }

    protected function message()
    {
        return [
          'password.regex' => '密码必须是数字、字母、特殊字符的组合'
        ];
    }
}
